package YAVMM::HostStat;
use Moose;

use DateTime;

our $VERSION = '0.01';

extends 'YAVMM::Object';

has 'name' => (
    documentation => 'Host name',
    is            => 'rw',
    isa           => 'Str',
    required      => 1,
);

has 'timestamp' => (
    documentation => 'Unix timestamp (UTC)',
    is            => 'rw',
    isa           => 'Int',
    default       => sub { DateTime->now(time_zone => 'UTC')->epoch; }
);

#has 'memtotal' => (
#    documentation => 'Total memory (kB)',
#    is            => 'rw',
#    isa           => 'Int',
#    default       => 0,
#);

has 'vsz_used' => (
    documentation => 'virtual memory size used (kB)',
    is            => 'rw',
    isa           => 'Int',
    default       => 0,
);

has 'rss_used' => (
    documentation => 'resident set size, the non-swapped physical memory used (kB)',
    is            => 'rw',
    isa           => 'Int',
);

has 'cpu_used' => (
    documentation => 'Percentage of CPU used',
    is            => 'rw',
    isa           => 'Num',
    default       => 0,
);

has 'pmem_used' => (
    documentation => 'Percentage of memory used',
    is            => 'rw',
    isa           => 'Num',
    default       => 0,
);

__PACKAGE__->meta->make_immutable;
no Moose;
1;
